$(function(){
    $('.warp_int').height($(window).height());
    $('#fwsy').click(function(){

        $('#qixi_main').height($(window).height()-100)
        $('dl').height($(window).height()-200).css('overflow','auto');
    })

    function isTouchDevice() {
        try {
            document.createEvent("TouchEvent");
            return true;
        } catch(e) {
            return false;
        }
    }

    function touchScroll(id) {
        if (isTouchDevice()) {

            var el = document.getElementById(id);
            var scrollStartPos = 0;
            document.getElementById(id).addEventListener("touchstart",
                function(event) {
                    scrollStartPos = this.scrollTop + event.touches[0].pageY;
                    event.preventDefault();
                },
                false);
            document.getElementById(id).addEventListener("touchmove",
                function(event) {
                    this.scrollTop = scrollStartPos - event.touches[0].pageY;
                    event.preventDefault();
                },
                false);
        }
    }

    touchScroll("qixi_main");

    $('.warp_int a').click(function(){

        $('.warp_int').hide()

    })

    if($(window).height()<$(document).height()){
        $('.bottom-ad').removeClass('bottom_cs')
        $('.footer').removeClass('ft_cs')
    }else{
        $('.bottom-ad').addClass('bottom_cs')
        $('.footer').addClass('ft_cs')
    }
})